package cn.edu.scau.cmil.luochenghao.comprehensive;

import java.awt.*;
import javax.swing.*;

public class Look {
	public static void look(String[][] student) {
		JFrame x = new JFrame("查看信息");//定义一个新窗口用于显示数组student的信息
		x.setLayout(new FlowLayout());//用流式布局显示数据
		for(int i=0;student[i][0]!=null;i++) {//数组下标789的课程、专业、班级一般较长，放在另一个标签差不多等于换行
			x.add(new JLabel(student[i][0]+" "+student[i][1]+" "+student[i][2]+" "+student[i][3]+" "+student[i][4]+" "+student[i][5]+" "+student[i][6]));
			x.add(new JLabel(student[i][7]+" "+student[i][8]+" "+student[i][9]));
		}
		x.setResizable(true);
		x.setSize(500, 400);
		x.setLocationRelativeTo(null);
		x.setVisible(true);
		x.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
	}
}
